### Programas
CC = gcc

### Opcoes
PROGRAM = lparser
DEBUG = -ggdb
WARNING = -Wall
DELETE = /bin/rm -f
CCOPTIONS = ${DEBUG} ${WARNING}
PACKAGES = glib-2.0 gtk+-2.0
LIBS = `pkg-config --libs ${PACKAGES}`
CFLAGS = `pkg-config --cflags ${PACKAGES}`
OBJ = lparser_cli.o logicparser.o

all: ${OBJ}
	${CC} ${OBJ} -o ${PROGRAM} ${LIBS} ${CCOPTIONS}

lparser_cli.o: lparser_cli.c
	${CC} lparser_cli.c -c ${CFLAGS} ${CCOPTIONS}

logicparser.o: logicparser.c logicparser.h
	${CC} logicparser.c -c ${CFLAGS} ${CCOPTIONS}

#elimina arquivos inúteis
clean:
	${DELETE} *.o *~ ${PROGRAM}
